package com.neoCalf.neoUser.feigns;

import com.neoCalf.neoCommon.entity.ChatMessage;
import com.neoCalf.neoCommon.entity.Session;
import com.neoCalf.neoCommon.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "chatService", path = "/api")
public interface ChatServiceFeign {
    /**
     * 根据消息id列表查询消息
     */
    @PostMapping("/chat/findChatMessageList")
    R<List<ChatMessage>> findChatMessageList(@RequestParam("list") List<String> list);

    /**
     * 根据用户id查询会话列表
     */
    @PostMapping("/chat/findSessionList")
    R<List<Session>> findSession(@RequestParam("userId") String userId);
}
